package aerolinea

import org.junit.Assert
import org.junit.Before
import org.junit.Test
import servicios.AbstractHibernateTest
import servicios.AerolineaManager

class AerolineaTest extends AbstractHibernateTest {
	
	@Before
	override void setUp() throws Exception{
		cargarTablas
	}
	
	@Test
	def void testConsultarAerolinea() throws Exception {
		var aerolinea1= new AerolineaManager().consultarAerolinea("AA")
		var aerolinea2= new AerolineaManager().consultarAerolinea("LAPA")
		Assert.assertTrue(aerolinea1.nombre == "AA")
		Assert.assertEquals(aerolinea1.vuelosOfertados.size, 4)
		Assert.assertTrue(aerolinea2.nombre == "LAPA")
		Assert.assertEquals(aerolinea2.vuelosOfertados.size, 4)
	}
}